

if (ExtractionOn==0) then {pEVAC SideChat "Sierra 6 to Raw Hide 1, extraction aborted, standing by, over."};if (ExtractionOn==1) then {[west,"HQ"] SideChat format ["CrossRoad to Raw Hide 1, extraction confirmed at %1, stand-by, over.",[hEVAC] call GetRCoord]};if (ExtractionOn==2) then {pEVAC SideChat format ["Sierra 6 to Raw Hide 1, proceeding on to %1 for extraction, over.",[hEVAC] call GetRCoord]};if (ExtractionOn==4) then {[west,"HQ"] sideChat "CrossRoad to Raw Hide 1, EVAC Chopper destroyed, support unavailable until further notice. Good luck, over."};

if (isServer) then {

if (ExtractionOn==1) then {

ExtractionOn=3;PublicVariable "ExtractionOn";

uhEVAC=createVehicle ["uh60mg", getMarkerpos "uh60", ["uh60"], 0, "FLY"];
uhEVAC setpos [getpos uhEVAC select 0,getpos uhEVAC select 1,600];
uhEVAC addEventHandler ["Killed",{ExtractionOn=4;publicVariable "ExtractionOn";}];
uhEVAC addEventHandler ["hit",{pEVAC sideChat "Sierra 6 under fire, I say again, Sierra 6 taking fire!"}];
publicVariable "uhEVAC";
_grp=CreateGroup west;
pEVAC=_grp createUnit ["SoldierWPilot", [0,0,0], ["uh60"], 0, "FORM"];
[pEVAC] join _grp;
pEVAC setrank "colonel";
pEVAC setskill 1;
publicVariable "pEVAC";
//pEVAC addEventHandler ["Killed",{ExtractionOn=4;publicVariable "ExtractionOn";}];
uhEVAC flyinheight 600;

pEVAC moveindriver uhEVAC;
pEVAC domove position hEVAC;
ExtractionOn=2;
PublicVariable "ExtractionOn"};


if (ExtractionOn==2) then {
_n=false;
ExtractionOn=3;PublicVariable "ExtractionOn";uhEVAC flyinheight 600;dostop uhEVAC;pEVAC domove position hEVAC;
while {ExtractionOn==3 and not _n} do {
if (Unitready pEVAC) then {_n=true;_lding=[] execVM "Computer\landing.sqf"};
sleep .5};
};


if (ExtractionOn==0) then {ExtractionOn=3;PublicVariable "ExtractionOn";dostop uhEVAC;pEVAC domove getmarkerpos "uh60";};


};


if (true) exitWith {};